<?php
include_once("commonMysql.class.php");
class Order extends commonMysql{

    public function createOrder($data,$userId){
        $order_sn=time().$userId;
//        $sqlWhere="(order_sn,user_id,goods_id,price)  VALUES  ('".$order_sn."','".$userId."','".$data['goodsId']."','".$data['price']."')";
        $sql="INSERT INTO  `order` (`id`, `order_sn`, `user_id`, `status`, `goods_id`, `price`) VALUES (NULL, '".$order_sn."', '".$userId."', '1', '".$data['goodsId']."', '".$data['price']."')";

        $rs=mysqli_query($this->conn,$sql);

        return $rs;
    }
   
}